<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------


Route::group('admin', function() {
    Route::rule('/', 'admin/index/index', 'get|post');
    Route::rule('register', 'admin/index/register', 'get|post');
    Route::rule('index', 'admin/home/index', 'get');
    Route::rule('adminlist', 'admin/home/adminlist', 'get');
    Route::rule('loginout', 'admin/index/loginout', 'post');
    Route::rule('adminadd', 'admin/home/adminadd', 'get|post');
    Route::rule('admindis', 'admin/home/admindisabled', 'post');
    Route::rule('adminedit/[:id]', 'admin/home/adminedit', 'get|post');
    Route::rule('admindel', 'admin/home/admindel', 'post');
    Route::rule('catelist', 'admin/cate/catelist', 'get');
    Route::rule('cateadd', 'admin/cate/cateadd', 'get|post');
    Route::rule('catesort', 'admin/cate/catesort', 'post');
    Route::rule('cateedit/[:id]', 'admin/cate/cateedit', 'get|post');
    Route::rule('catedel', 'admin/cate/catedel', 'post');
    Route::rule('articlelist', 'admin/article/articlelist', 'get');
    Route::rule('articleadd', 'admin/article/articleadd', 'get|post');
    Route::rule('articleup', 'admin/article/articleup', 'post');
    Route::rule('articleedit/[:id]', 'admin/article/articleedit', 'get|post');
    Route::rule('articledel', 'admin/article/articledel', 'post');
    Route::rule('memberlist', 'admin/member/memberlist', 'get');
    Route::rule('memberadd', 'admin/member/memberadd', 'get|post');
    Route::rule('memberedit/[:id]', 'admin/member/memberedit', 'get|post');
    Route::rule('memberdel', 'admin/member/memberdel', 'post');
    Route::rule('system', 'admin/system/system', 'get|post');
})->ext('html');

Route::rule('index/:id', 'index/index/index', 'get');
Route::rule('article/:id', 'index/article/info', 'get');
Route::rule('comment', 'index/article/comment', 'post');
Route::rule('register', 'index/index/register', 'get|post');
Route::rule('login', 'index/index/login', 'get|post');

Route::rule('/', 'index/index/index', 'get');